BFD status shouldn't 404 if only one scrimlet is present#9979
Open
jgallagher wants to merge 3 commits intomainfrom
Open
BFD status shouldn't 404 if only one scrimlet is present#9979jgallagher wants to merge 3 commits intomainfrom
jgallagher wants to merge 3 commits intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(I ran into this while shaving yaks as a part of #9832.)
There are three changes here:
af1090c changes
Nexus::mg_clients()to look up MGD in DNS to find ports instead of assuming the hardcodedMGD_PORT. This allowsmg_clients()to be useful in tests. (#[nexus_test]assigns random ports to services, but does put those ports in DNS.) This is kinda grody; we end up doing three DNS lookups (dendrite, MGS, and MGD) to build aHashMap<SwitchLocation, MgdClient>), but I didn't want to try to tackle that in this same PR. #8999 is related, and discussions some possible options that would let us squash this down.ae54bbc adds a very simple test that hits the BFD status endpoint, expecting it to be empty. Without the fix from the next commit, this test fails with a 404 because
#[nexus_test]only sets up one scrimlet (switch0), causing the BFD status endpoint to 404 because it can't find the other switch:bd79324 changes
bfd_status()to skip missing switches instead of 404ing, so we still get status from the one switch. This allows the test in the previous commit to pass.